﻿using RecruitmentAgency.Controllers;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace RecruitmentAgency.Tests.Controllers
{
    /// <summary>
    ///This is a test class for BaseControllerTest and is intended
    ///to contain all BaseControllerTest Unit Tests
    ///</summary>
    [TestClass()]
    public class BaseControllerTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

       
        /// <summary>
        ///A test for UserIsAuthenticated        
        [TestMethod()]        
        public void UserIsAuthenticatedTest()
        {
            BaseController_Accessor target = new BaseController_Accessor(); 
            bool actual = target.UserIsAuthenticated;
            bool expected = false;
            Assert.AreEqual(expected, actual);           
        }

        /// <summary>
        ///A test for Role
        ///</summary>       
        [TestMethod]        
        public void RoleTest()
        {
            BaseController target = new BaseController(); 
            string expected = "1";
            target.Role = expected;
            string actual = target.Role;
            Assert.AreEqual(expected, actual);            
        }

        /// <summary>
        ///A test for PageSize
        ///</summary>       
        [TestMethod]
        public void PageSizeTest()
        {
            BaseController_Accessor target = new BaseController_Accessor();
            int actual = target.PageSize;
            int expected = 1;
            Assert.AreNotEqual(expected, actual); 
            
        }

        /// <summary>
        ///A test for MinimumPasswordLength
        ///</summary>      
        [TestMethod]        
        public void MinimumPasswordLengthTest()
        {
            BaseController_Accessor target = new BaseController_Accessor();
            int actual = target.MinimumPasswordLength;
            string password = "password";
            int passwordLenght = password.Length;
            Assert.IsTrue(passwordLenght >= actual);
        }

        /// <summary>
        ///A test for IsJobProvider
        ///</summary>        
        [TestMethod]
        public void IsJobProviderTest()
        {
            BaseController target = new BaseController(); 
            bool actual = target.IsJobProvider;
            bool expected = false;
            Assert.AreEqual(actual,expected);
            
        }

        /// <summary>
        ///A test for IsAdmin
        ///</summary>       
        [TestMethod()]
        public void IsAdminTest()
        {
            BaseController target = new BaseController();
            bool actual = target.IsJobProvider;
            bool expected = false;
            Assert.AreEqual(actual, expected);
        }        

        /// <summary>
        ///A test for CurrentPersonId
        ///</summary>        
        [TestMethod]      
        public void CurrentPersonIdTest()
        {
            BaseController target = new BaseController(); 
            int expected = 0;
            target.CurrentPersonId = expected;
            int actual = target.CurrentPersonId;
            Assert.AreEqual(expected, actual);            
        }
    }
}